home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 10 / FM Towns Free Software Collection 10.iso / taropyon / install / _edia.c < prev    next >
Text File  |  1995-05-12  |  4KB  |  126 lines

  1. /*************************************************************************
  2. *    EDIA
  3. *************************************************************************/
  4.  
  5. int        _edia_config(char *instdir, int item_setup)
  6. {
  7.     int            ret;
  8.     char       *dlgTxm;
  9.     char       *dlgGets;
  10.     char        tmp[256], buf[8];
  11.  
  12.     _edia_swapDrv = -1;
  13.  
  14.     _tc_pre_config( instdir, "edia.exp", "EDIA" );
  15.  
  16.     if ( item_setup )
  17.     {
  18.         if ( (dlgGets = DlgGets_open()) == NULL )
  19.             return (ERR);
  20.  
  21.         DlgGets_setTitle(dlgGets,Fnt16x16,"EDIA 環境設定");
  22.         buf[0] = _edia_swapDrv < 0 ? toupper(instdir[0]) : _edia_swapDrv + 'A';
  23.         buf[1] = '\0';
  24.         DlgGets_setSize(dlgGets,320,64);
  25.         DlgGets_putf( dlgGets, Fnt16x16, 1, "作業ドライブを指定してください(例:「D」)。" );
  26.         DlgGets_setPosition(dlgGets,DLGPOS_CENTER_OF_SCREEN);    /* 画面中央    */
  27.         if ( DlgGets_start(dlgGets,3,buf) == NORMAL )
  28.         {
  29.             if ( isalpha(buf[0]) )
  30.                 _edia_swapDrv = toupper(buf[0]);
  31.             else
  32.                 _edia_swapDrv = -1;
  33.         }
  34.         DlgGets_close(dlgGets);
  35.     }
  36.  
  37.     /* 画面モード    ----------------------------------------------------*/
  38.     _edia_scnmode  = -1;
  39.     if ( item_setup )
  40.     {
  41.         dlgTxm = DlgTxm_open(ColBoxNormal);
  42.         DlgTxm_setTitle(dlgTxm,Fnt16x16,"EDIA 画面モード");
  43.  
  44.         DlgTxm_putf( dlgTxm, Fnt16x16, TXMDAT_ATT_CENTER,
  45.             "動作画面モードを指定してください。");
  46.         DlgTxm_putf( dlgTxm, Fnt16x12, TXMDAT_ATT_CENTER, "");
  47.  
  48.         DlgTxm_putf( dlgTxm, Fnt16x16, TXMDAT_ATT_CENTER, "中解像度    … 640×480ドット                            " );
  49.         DlgTxm_putf( dlgTxm, Fnt16x16, TXMDAT_ATT_CENTER, "高解像度    … 1024×768ドット 高解像度TBIOS を組み込んだ" );
  50.         DlgTxm_putf( dlgTxm, Fnt16x16, TXMDAT_ATT_CENTER, "               場合に使用できます。高解像度に対応した機種" );
  51.         DlgTxm_putf( dlgTxm, Fnt16x16, TXMDAT_ATT_CENTER, "               (MX/MA/HC/HB/HA等)で使用できます。  " );
  52.  
  53.  
  54.         DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, C_MBLACK, C_WHITE, C_HILIGHT, C_DARK, 'N'  , KA_N  ,
  55.             1, "", 0, "中解像度  : [N]");
  56.         DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, C_MBLACK, C_WHITE, C_HILIGHT, C_DARK, 'H'  , KA_H  ,
  57.             2, "", 0, "高解像度 : [H]");
  58.  
  59.         DlgTxm_setSize(dlgTxm,320,40);
  60.         DlgTxm_setPosition(dlgTxm,DLGPOS_CENTER_OF_SCREEN);
  61.         do
  62.         {
  63.             ret = DlgTxm_start(dlgTxm);
  64.         } while ( ret < 0 );
  65.         DlgTxm_close(dlgTxm);
  66.         switch ( ret )
  67.         {
  68.             case 1: _edia_scnmode = 0;    break;
  69.             case 2: _edia_scnmode = 5;    break;
  70.         }
  71.     }
  72.  
  73.  
  74.     return (NORMAL);
  75. }
  76.  
  77. int        _edia_install(char *instdir,int item_setup)
  78. {
  79.     int            ret, att, drv;
  80.     char       *srcdir, *instfile;
  81.     char       *item_prog, *item_ttl, item_para[128];
  82.     int            item_att;
  83.     char        tmp[256], scnmode_para[32];
  84.  
  85.     syl_putf("EDIA INSTALL");
  86.  
  87.     srcdir       = "/TAROPYON/EDIA";
  88.     instfile     = "*.exp *.cci *.c *.h *.rex *.dll *.doc";
  89.     item_prog    = "EDIA.EXP";
  90.     item_ttl     = "EDIA";
  91.     item_para[0] = '\0';
  92.     item_att     = 2;
  93.  
  94.     srcdir = _tc_getFcopySrcDir( srcdir, tmp);
  95.     att    = _FCOPY_MODE_INIT;
  96.     ret    =  FCOPY_exec(att, srcdir, instfile, instdir);
  97.  
  98.     /* 環境設定    --------------------------------------------------------*/
  99.     syl_putf("EDIA CUSTOMIZE");
  100.     _edia_setup(instdir,item_setup);
  101.  
  102.     if ( ret == NORMAL && item_setup != 0 )
  103.     {    /* アイテム登録    */
  104.         syl_putf("EDIA ITEM SETUP");
  105.         if ( _edia_scnmode == 5 )
  106.             strcpy(scnmode_para, "-scnMode H ");
  107.         else
  108.             scnmode_para[0] = '\0';
  109.         if ( isalpha(_edia_swapDrv) )
  110.             sprintf(item_para,"%s-swapDrv %c", scnmode_para, _edia_swapDrv);
  111.         else
  112.             strcpy( item_para, scnmode_para);
  113.         drv = toupper(instdir[0]) - 'A';
  114.         strcpy(tmp,instdir);
  115.         add_path_fn(tmp,item_prog);
  116.         item_setApl( drv, 1024, item_ttl, tmp, item_para, item_att );
  117.     }
  118.  
  119.     return (ret);
  120. }
  121.  
  122. int        _edia_setup(char *instdir,int item_setup)
  123. {
  124.     return _hewin_edia_setup("edia.mac", instdir, item_setup);
  125. }
  126.